package tec;

import java.io.Writer;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.IOException;

public class CollecteFichier extends Collecte {

    private FileWriter file;
    private PrintWriter file_printer;

    public CollecteFichier (String filename) {
	super();
	try {
	    this.file = new FileWriter(filename);
	}
	catch (IOException e) {
	}
	this.file_printer = new PrintWriter(this.file);
    }

    public void ajouterDonnees () {
	this.file_printer.println("arret : " + numero_arret + "\nentrees : " + entrees + "\nsorties : " + sorties + "\n");
	this.file_printer.flush();	
    }

}